<html>
	
	<head>
	<link rel="stylesheet" type="text/css" href="../doc.css" />
	<style type="text/css">
.auto-style1 {
	font-size: 18px;
}
.auto-style4 {
	border-style: solid;
	border-width: 1px;
	}
.auto-style6 {
	text-align: center;
	border-style: solid;
	border-width: 1px;
}
.auto-style5 {
	border-style: solid;
	border-width: 1px;
}
</style>
<script type="text/javascript" language="JavaScript"><!--
function To(url) {
location.replace(url);
}
//--></script>
	</head>

	<body>

		<h1><u>Directives</u></h1>
		
		<h2>Table of Contents</h2>
		<table border=1 style="width: 475px">
			<tr>
				<td style="width: 60px; height: 32px">
					<a href="javascript:To('#start')">START</a>
				</td>
				<td style="width: 64px; height: 32px">
					<a href="javascript:To('#reset')">RESET</a>
				</td>
				<td style="width: 56px; height: 32px">
					<a href="javascript:To('#equ')">EQU</a>
				</td>
				<td style="width: 63px; height: 32px">
					<a href="javascript:To('#eque')">EQUE</a>
				</td>
				<td style="width: 65px; height: 32px">
					<a href="javascript:To('#entry')">ENTRY</a>
				</td>
				<td>
					<a href="javascript:To('#extrn')">EXTRN</a>
				</td>
			</tr>
			<tr>
				<td style="width: 60px; height: 33px">
					<a href="javascript:To('#end')">END</a>
				</td>
				<td style="width: 64px; height: 33px">
					<a href="javascript:To('#dat')">DAT</a>
				</td>
				<td style="width: 56px; height: 33px">
					<a href="javascript:To('#adc')">ADC</a>
				</td>
				<td style="width: 63px; height: 33px">
					<a href="javascript:To('#adce')">ADCE</a>
				</td>
				<td style="width: 65px; height: 33px">
					<a href="javascript:To('#nop')">NOP</a>
				</td>
				<td style="width: 53px; height: 33px">
					<a href="javascript:To('#notations')">NOTATIONS</a>
				</td>
			</tr>
		</table>
		
		<p class="auto-style1">Note: The Directives in this assembler are case 
		insensitive. They can be uppercase, lowercase or mixed case.</p>
		<p class="auto-style1">Format:&nbsp;&nbsp;&nbsp; label(if required)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		Directive&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Operand&nbsp;&nbsp;</p>
		<p class="auto-style1">&nbsp;The label, directive and operand are seperated by field seperators. The 
		operands if labels are case sensitive.</p>
		<h2><a name="start">START</a></h2>
		<table border=1>
			<tr>
				<td style="width: 138px">
					Description
				</td>
				<td>
					<br>This directive sets the location counter of the program 
					to the relocatable address specified by nmax. This needs to 
					appear at the begenning of the program.  Only a number can 
					be passed in the operand field. <br>Usage:&nbsp;&nbsp;&nbsp;&nbsp; 
					programname&nbsp;&nbsp;&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp; 
					10&nbsp;&nbsp;&nbsp;&nbsp; :LC (location counter) starts at 
					10.<br>
				</td>
			</tr>
			
			<tr>
				<td style="height: 38px; width: 138px">
					Format
				</td>
				<td style="height: 38px">
					rlabel&nbsp;&nbsp;&nbsp;&nbsp; start&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nmax
				</td>
			</tr>
			
			<tr>
				<td style="width: 138px; height: 46px">
					Consumes memory
				</td>
				<td style="height: 46px">
					No</td>
			</tr>
		</table>
		
		<h2><a name="reset">RESET</a></h2>
		<table border=1>
			<tr>
				<td style="height: 45px; width: 140px">
					Description
				</td>
				<td style="height: 45px; width: 676px">
					<br>This directive sets the location counter of the 
					assembler to the relocatable address specified by the 
					operand. The Reset directive can appear multiple times in a 
					program This directive generates a Linking record in the 
					object file each time it is called.<br>Usage:&nbsp;&nbsp; AA&nbsp;&nbsp;&nbsp; 
					RESET&nbsp;&nbsp;&nbsp; 78&nbsp;&nbsp;&nbsp;&nbsp; :LC is 78<br>
					or&nbsp;&nbsp;&nbsp;&nbsp; RA&nbsp;&nbsp;&nbsp;&nbsp; RESET&nbsp;&nbsp;&nbsp;&nbsp; 
					HH&nbsp;&nbsp;&nbsp;&nbsp; :LC is value of HH<br>
				</td>
			</tr>
			
			<tr>
				<td style="width: 140px; height: 38px">
					Format
				</td>
				<td style="width: 676px; height: 38px">
					rlabel start Mlabel
				</td>
			</tr>
			
			<tr>
				<td style="width: 140px; height: 37px">
					Consumes memory
				</td>
				<td style="width: 676px; height: 37px">
					Yes</td>
			</tr>
		</table>
		
		<h2><a name="equ">EQU</a></h2>
		<table border=1>
			<tr>
				<td>
					Description
				</td>
				<td>
					<br>This directive makes the rlabel have the same value as 
					that of the operand. The operand could be a number in which 
					case the rlabel aquires the value of the number.The operand 
					could also be a label in which case the label needs to be 
					equated earlier in the program. <br>Usage:&nbsp; Dirt&nbsp;&nbsp;&nbsp;&nbsp; 
					EQU&nbsp;&nbsp;&nbsp;&nbsp; 56<br>Now the value of Dirt is 
					56.<br>or&nbsp;&nbsp;&nbsp; Dirt&nbsp;&nbsp;&nbsp; EQU&nbsp;&nbsp; 
					DD<br>Here, the value of Dirt is the same as the value of 
					DD.<br>
				</td>
			</tr>
			
			<tr>
				<td>
					Format
				</td>
				<td>
					rlabel equ [nmax or elabel]
				</td>
			</tr>
			
			<tr>
				<td>
					Consumes memory
				</td>
				<td>
					N
				</td>
			</tr>
		</table>
		
		<h2><a name="eque">EQUE</a></h2>
		<table border=1>
			<tr>
				<td>
					Description
				</td>
				<td style="width: 687px">
					<br>(EQU_Expression). Works in the same way as EQU, except in this case the 
					operands can make use if + and - operations. While using 
					these arithmatic operations, the result needs to be in the 
					range of 0 - 1024. This directive cannot be used in 
					conjencture with with external references. Ex:&nbsp;&nbsp; 
					RR&nbsp;&nbsp;&nbsp;&nbsp; EQUe&nbsp;&nbsp;&nbsp; TT+5 is 
					not allowed if TT is an external reference.<br>Usage:&nbsp; 
					YY&nbsp;&nbsp;&nbsp; EQUe&nbsp; 8+9-2<br>or&nbsp;&nbsp;&nbsp;&nbsp; 
					YY&nbsp;&nbsp;&nbsp;&nbsp; EQUe&nbsp;&nbsp;&nbsp; Dirt+AA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					:Dirt and AA need to be previously equated in the program.<br>&nbsp;</td>
			</tr>
			
			<tr>
				<td>
					Format
				</td>
				<td style="width: 687px">
					rlabel eque expression1
				</td>
			</tr>
			
			<tr>
				<td>
					Consumes memory
				</td>
				<td style="width: 687px">
					N
				</td>
			</tr>
		</table>
		
		<h2><a name="entry">ENTRY</a></h2>
		<table border=1>
			<tr>
				<td>
					Description
				</td>
				<td style="width: 684px">
					<br>(Shared Variable (entry) name). This directive declares 
					a lable that can be used as an operand by other programs. 
					The label passed as an operand in this directive must appear 
					as a label elsewhere in the program. Entry directive 
					generates a Linking record in the object file.<br>Usage:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					ENTRY&nbsp;&nbsp;&nbsp; routine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					:routine needs to appear as a label somewhere in the 
					program.<br>
				</td>
			</tr>
			
			<tr>
				<td style="height: 35px">
					Format
				</td>
				<td style="width: 684px; height: 35px">
					none entry rlabel
				</td>
			</tr>
			
			<tr>
				<td>
					Consumes memory
				</td>
				<td style="width: 684px">
					No</td>
			</tr>
		</table>
		
		<h2><a name="extrn">EXTRN</a></h2>
		<table border=1>
			<tr>
				<td style="height: 47px">
					Description
				</td>
				<td style="width: 673px; height: 47px">
					<br>(External Variable Name). This directive declares the 
					rlabel passed as the operand to be an external variable 
					(label in another program). The rlabel must not appear as a 
					label anywhere in the program. The rlabel passed as the 
					operand must also be defined as an Entry variable in some 
					other program.<br>Usage:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					EXTERN&nbsp;&nbsp;&nbsp;&nbsp; frogs<br>
				</td>
			</tr>
			
			<tr>
				<td style="height: 32px">
					Format
				</td>
				<td style="width: 673px; height: 32px">
					none extrn rlabel
				</td>
			</tr>
			
			<tr>
				<td style="height: 35px">
					Consumes memory
				</td>
				<td style="width: 673px; height: 35px">
					No</td>
			</tr>
		</table>
		
		<h2><a name="end">END</a></h2>
		<table border=1>
			<tr>
				<td style="width: 124px">
					Description
				</td>
				<td style="width: 679px">
					<br>This directive tells the assembler that that the program 
					has ended. Any lines that appear after this directive will 
					generate a warning message. The rlabel passed as the operand 
					must be the exact same as the operand used in the start 
					directive.<br>Usage:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp;&nbsp;&nbsp;&nbsp; 
					programname<br>
				</td>
			</tr>
			
			<tr>
				<td style="height: 34px; width: 124px">
					Format
				</td>
				<td style="width: 679px; height: 34px">
					none end rlabel
				</td>
			</tr>
			
			<tr>
				<td style="height: 26px; width: 124px">
					Consumes memory
				</td>
				<td style="width: 679px; height: 26px">
					No</td>
			</tr>
		</table>
		
		<h2><a name="dat">DAT</a></h2>
		<table border=1>
			<tr>
				<td style="width: 131px">
					Description
				</td>
				<td style="width: 679px">
					<br>This directives stores the data passed as operand in the 
					memory. The directive creates one word of storage for the 
					operand.<br>Usage:&nbsp;&nbsp;&nbsp;&nbsp; AA&nbsp;&nbsp;&nbsp;&nbsp; 
					dat&nbsp;&nbsp;&nbsp;&nbsp; I=993<br>or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X=99FF<br>
				</td>
			</tr>
			
			<tr>
				<td style="height: 40px; width: 131px">
					Format
				</td>
				<td style="width: 679px; height: 40px">
					olabel dat [I= or C= or B= or X=]
				</td>
			</tr>
			
			<tr>
				<td style="width: 131px">
					Consumes memory
				</td>
				<td style="width: 679px">
					Yes
				</td>
			</tr>
		</table>
		
		<h2><a name="adc">ADC</a></h2>
		<table border=1>
			<tr>
				<td style="width: 131px">
					Description
				</td>
				<td style="width: 679px">
					<br>This directive is the address constant. It stores the 
					address of the operand that has been passed in the last 8 
					bits of the memory word. A number can be passed as the 
					operand but the number must always be preceded by a '+' 
					sign. If a number is passed, then the directive is absolute. 
					If not,it is either relocatable or external. The operand 
					supports arithmatic addition of upto two elements in this 
					case, Each element can be either an external reference or a 
					relocation.<br>Usage:&nbsp;&nbsp; XX&nbsp;&nbsp;&nbsp;&nbsp; 
					adc&nbsp;&nbsp;&nbsp; Dirt+Frogs<br>or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					adc&nbsp;&nbsp;&nbsp;&nbsp; +889<br>
				</td>
			</tr>
			
			<tr>
				<td style="height: 37px; width: 131px">
					Format
				</td>
				<td style="width: 679px; height: 37px">
					olabel adc Mlabel
				</td>
			</tr>
			
			<tr>
				<td style="width: 131px; height: 32px">
					Consumes memory
				</td>
				<td style="width: 679px; height: 32px">
					Yes</td>
			</tr>
		</table>
		
		<h2><a name="adce">ADCE</a></h2>
		<table border=1>
			<tr>
				<td style="width: 132px">
					Description
				</td>
				<td style="width: 677px">
					<br>(ADC_expression). Works in the same way as the adc directive except that 
					it supports address computations as long as the result of 
					these computation fits in 16-bits. The result could be 
					either positive or negative. The operand includes constants, 
					localand external references and Star notation. If there is 
					a star in the operation,it must appear first and only once.<br>
					Usage:&nbsp;&nbsp;&nbsp;&nbsp; AA&nbsp;&nbsp;&nbsp;&nbsp; 
					adce&nbsp;&nbsp;&nbsp;&nbsp; Dirt+9-Frogs<br>or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					adce&nbsp;&nbsp; *+5+GG+AA<br>&nbsp;</td>
			</tr>
			
			<tr>
				<td style="width: 132px; height: 31px">
					Format
				</td>
				<td style="width: 677px; height: 31px">
					olabel adce expression2
				</td>
			</tr>
			
			<tr>
				<td style="width: 132px; height: 30px">
					Consumes memory
				</td>
				<td style="width: 677px; height: 30px">
					Yes
				</td>
			</tr>
		</table>
		
		<h2><a name="nop">NOP</a></h2>
		<table border=1>
			<tr>
				<td style="height: 120px">
					Description
				</td>
				<td style="width: 678px; height: 120px">
					<br>No operation. This directive consumes memory and 
					effectively does the exact same thing as MOPER&nbsp; ADD,=0<br>
					The directive may be used to consume time.<br>Usage:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					NOP<br>
				</td>
			</tr>
			
			<tr>
				<td style="height: 28px">
					Format
				</td>
				<td style="width: 678px; height: 28px">
					none nop none
				</td>
			</tr>
			
			<tr>
				<td>
					Consumes memory
				</td>
				<td style="width: 678px">
					Yes</td>
			</tr>
		</table>
		<p>&nbsp;</p>
		<h2><a name="notations">Directive Notations</a></h2>
		<table align="center" class="auto-style4" style="width: 88%">
			<tr>
				<td class="auto-style6" style="width: 222px">Label</td>
				<td class="auto-style5"><br>The labels in this machine are upto 
				32 columns in length.The rules for labels are:<br>1. They can be 
				uppercase, lowercase or both.<br>2. Every labelmust start with 
				a-z or A-Z.<br>3. Columns 2 to 6 can have a number or an 
				alphabet.<br>4. There can only be upto 50 labels per assembly<br>
				5. Labels are case sensitive.<br><br></td>
			</tr>
			<tr>
				<td class="auto-style6" style="width: 222px">elabel</td>
				<td class="auto-style5"><br>It is a label that has already been 
				generated and appears previously in the program.<br><br></td>
			</tr>
			<tr>
				<td class="auto-style6" style="width: 222px; height: 37px">
				Mlabel</td>
				<td class="auto-style5" style="height: 37px"><br>It could be a 
				label, a number (0-1024), external label/reference or an elabel.<br><br>
				</td>
			</tr>
			<tr>
				<td class="auto-style6" style="width: 222px">rlabel</td>
				<td class="auto-style5"><br>Label is required. Error is label is 
				not present.<br><br></td>
			</tr>
			<tr>
				<td class="auto-style6" style="width: 222px; height: 37px">
				olabel</td>
				<td class="auto-style5" style="height: 37px"><br>Label is 
				optional. It is upto the user whether or not they wish to 
				include a label.<br><br></td>
			</tr>
			<tr>
				<td class="auto-style6" style="width: 222px">nmax</td>
				<td class="auto-style5"><br>A number with the range 0 to 1024.<br><br>
				</td>
			</tr>
			<tr>
				<td class="auto-style6" style="width: 222px; height: 63px;">none</td>
				<td class="auto-style5" style="height: 63px"><br>No label should be present. If a 
				label is present the assembler will display a warning level 
				error.<br><br></td>
			</tr>
			<tr>
				<td class="auto-style6" style="width: 222px">Star</td>
				<td class="auto-style5"><br>The star (*) can appear when an 
				expression is passed in an operand. The star must appear first 
				in the expression and can only appear once.<br></td>
			</tr>
		</table>
	</body>
</html>
